package wlt.xxljob.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Setter
@Getter
@Component
public class XxlJobAdmin {
    @Value("${xxl-job-admin.url}")
    private String url;
    @Value("${xxl-job-admin.jobGroup}")
    private int jobGroup;		// 执行器主键ID
    @Value("${xxl-job-admin.author}")
    private String author;		// 负责人
    @Value("${xxl-job-admin.alarmEmail}")
    private String alarmEmail;	// 报警邮件
    @Value("${xxl-job-admin.executorHandler}")
    private String executorHandler;		    // 执行器，任务Handler名称
    @Value("${xxl-job-admin.executorBlockStrategy}")
    private String executorBlockStrategy;	// 阻塞处理策略
    @Value("${xxl-job-admin.executorTimeout}")
    private int executorTimeout;     		// 任务执行超时时间，单位秒
    @Value("${xxl-job-admin.executorFailRetryCount}")
    private int executorFailRetryCount;		// 失败重试次数

    private int triggerStatus = 1; //新增任务后是否立即执行 0 不执行 1 执行
    private String cookie;  //登录后的token


    public String getJobGroupStr() {
        return String.valueOf(jobGroup);
    }
    public String getTriggerStatusStr() {return String.valueOf(triggerStatus);}
}
